const Sequelize = require('sequelize');
module.exports = function(sequelize, DataTypes) {
  return sequelize.define('base_draw_alone_info', {
    id: {
      autoIncrement: true,
      type: DataTypes.BIGINT,
      allowNull: false,
      primaryKey: true,
      comment: "唯一标识"
    },
    dantidrawinfoId: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "图审单体原信息ID",
      field: 'dantidrawinfo_id'
    },
    dantinum: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "单体编号"
    },
    dantiattach: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "单体施工图"
    },
    drawnum: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "图纸工号"
    },
    drawbooknum: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "图审合格书编号"
    },
    projectgrade: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "项目等级"
    },
    dantiname: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "工程名称"
    },
    totalarea: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "建筑面积"
    },
    abovearea: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "建筑面积地上"
    },
    underarea: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "建筑面积地下"
    },
    height: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "建筑高度"
    },
    abovefloor: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "地上层数"
    },
    underfloor: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "地下层数"
    },
    seismiccategory: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "抗震设防类别"
    },
    seismicgrade: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "抗震等级"
    },
    nature: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "性质"
    },
    linkguid: {
      type: DataTypes.STRING(100),
      allowNull: true,
      comment: "关联guid"
    },
    remark: {
      type: DataTypes.STRING(500),
      allowNull: true,
      comment: "备注"
    },
    isDeleted: {
      type: DataTypes.TINYINT,
      allowNull: true,
      comment: "1=已删除 0=未删除",
      field: 'is_deleted'
    },
    createdUser: {
      type: DataTypes.BIGINT,
      allowNull: true,
      comment: "创建人",
      field: 'created_user'
    },
    createdTime: {
      type: DataTypes.DATE,
      allowNull: true,
      comment: "本系统创建时间",
      field: 'created_time'
    },
    updatedUser: {
      type: DataTypes.BIGINT,
      allowNull: true,
      comment: "修改人",
      field: 'updated_user'
    },
    updatedTime: {
      type: DataTypes.DATE,
      allowNull: true,
      comment: "修改时间",
      field: 'updated_time'
    },
    drawMasterInfoId: {
      type: DataTypes.BIGINT,
      allowNull: true,
      comment: "图审主体外键draw_master_info",
      field: 'draw_master_info_id'
    }
  }, {
    sequelize,
    tableName: 'base_draw_alone_info',
    timestamps: false,
    indexes: [
      {
        name: "PRIMARY",
        unique: true,
        using: "BTREE",
        fields: [
          { name: "id" },
        ]
      },
    ]
  });
};
